package humans

import (
    `net/http`
    `io/ioutil`
)

// 过度抽象

type myGettet interface {
    Get(url string) (*http.Response, error)
}

func TooAbstract(gettrt myGettet, url string) ([]byte, error) {
    resp, err := gettrt.Get(url)
    if err != nil {
        return nil, err
    }
    defer resp.Body.Close()

    return ioutil.ReadAll(resp.Body)
}
